package com.chenglu.android.mine.login.mvp.model;




import com.chenglu.android.bean.LoginBean;
import com.chenglu.android.bean.SmsCodeBean;
import com.chenglu.android.common.net.RetrofitClientCL;
import com.chenglu.android.mine.login.mvp.contract.LoginContract;

import io.reactivex.rxjava3.core.Observable;

/**
 * @author: lyj
 * @Created by Copyright 2023/3/2 Guangzhou Hongma Technology Co., Ltd. All rights reserved.
 *
 */
public class LoginModel implements LoginContract.LoginModel {


    @Override
    public Observable<LoginBean> getLogin(String username, String smscode,String grantType) {
        return RetrofitClientCL.getInstance().getApi().getLogin(username, smscode, grantType);
    }

    @Override
    public Observable<LoginBean> refreshTokenLogin(String grantType, String refresh_token) {
        return null;
    }

    @Override
    public Observable<SmsCodeBean> getSmsCode(String mobile) {
        return RetrofitClientCL.getInstance().getApi().getSmsCode(mobile);
    }

    @Override
    public Observable<LoginBean> getOneLogin( String accessToken, String grantType) {
        return RetrofitClientCL.getInstance().getApi().getOneLogin(accessToken, grantType);
    }
}
